﻿namespace Finder.Utilities.KeyCapture
{
    /// <summary>
    /// Part of a hot key pair.
    /// </summary>
    public class HotKeyPart
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="HotKeyPart"/> class.
        /// </summary>
        /// <param name="keyCode">The key code.</param>
        /// <param name="keyName">Name of the key.</param>
        public HotKeyPart(int keyCode, string keyName)
        {
            this.KeyCode = keyCode;
            this.KeyName = keyName;
        }

        /// <summary>
        /// Gets the key code.
        /// </summary>
        /// <value>The key code.</value>
        public int KeyCode { get; private set; }

        /// <summary>
        /// Gets the name of the key.
        /// </summary>
        /// <value>The name of the key.</value>
        public string KeyName { get; private set; }

        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        public override string ToString()
        {
            return this.KeyName;
        }
    }
}